<!-- In this template we are using a function defined in nbbajax.js and jquery.genxmlajax.js so include the script here -->
<script type="text/javascript" src="/DesktopModules/NBright/NBrightBuy/Themes/config/js/nbbajax.js"></script>
<script src="/DesktopModules/NBright/NBrightBuy/Themes/config/js/jquery.genxmlajax.js" type="text/javascript"></script>
<script type="text/javascript" src="/DesktopModules/NBright/NBrightBuy/Themes/config/js/productajax.js"></script>

<script>
    $(document).ready(function () {
        // start load all ajax data, continued by js in product.js file
        nbxget('getproductlist', '#productselectparams', '#productlist');

        $('#productlist').change(function () {
            $('.editlink').unbind();
            $('.editlink').click(function () {
                $('.processing').show();
            });
        });

    });
</script>

<div id="loader" class="processing" style="display:none;">[<tag type="label" resourcekey="General.ProcessingDiv" />]</div>

<br />

<div id="pageactionssource"><!-- Page actions are moved into header bar - also exist at page bottom-->
	<div class="col-xs-9 col-sm-9">
		<a href="#" class="show-sidebar">
		  <i class="fa fa-bars"></i>
		</a>
		<div class="actionbuttonwrapper">
		[<tag id="cmdAddNew" type="linkbutton" cssclass="btn btn-primary" resourcekey="General.cmdAddButton" commandname="addnew" />]
		</div>
	</div>
	<div class="col-xs-3 col-sm-3 top-panel-right">
		<!-- no language on this page -->
	</div>
</div>


<div class="row">
	<div class="col-xs-12 col-sm-12">
		<div class="box">
			<div class="box-header">
				<div class="box-name">
					<i class="fa fa-search"></i><span>[<tag type="valueof" resourcekey="General.Find" />] [<tag type="valueof" resourcekey="General.Products" />]</span>
				</div>
				<div class="box-icons">
					<a class="collapse-link"><i class="fa fa-chevron-up"></i>
					</a><a class="expand-link"><i class="fa fa-expand"></i></a>
					<a class="close-link"><i class="fa fa-times"></i></a></div>
				<div class="no-move">
				</div>
			</div>
			<div class="box-content">
				<div class="form-horizontal dnnForm">
					<div id="productsearchsection" class="form-group"><!-- Is this ID needed? -->
						<label class="col-sm-1 control-label">[<tag type="valueof" resourcekey="General.Search" />]</label>
						<div class="col-sm-3">
							[<tag id="txtSearch" cssclass="form-control" type="textbox" />]
						</div>
						<label class="col-sm-1 control-label">[<tag type="valueof" resourcekey="General.Category" />]</label>
						<div class="col-sm-4">
							[<tag id="ddllistsearchcategory" cssclass="s2_with_tag populate placeholder" type="catdropdown" groupref="cat" allowblank="true" showhidden="true" />]
						</div>
						<div class="col-sm-3">
						<a class="btn btn-primary" href="#" id="listsearch">[<tag type="htmlof" resourcekey="General.cmdSearchIcon" />]</a>
						    <a class="btn btn-default" href="#" id="listreset">[<tag type="htmlof" resourcekey="General.cmdResetIcon" />]</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<div id="productselectparams">
    [<tag id="itemid" type="hidden" databind="ItemId" />]
    [<tag id="lang" type="editculture" />]
    [<tag id="header" type="hidden" value="productlistheader.html"/>]
    [<tag id="body" type="hidden" value="productlistbody.html"/>]
    [<tag id="footer" type="hidden" value="productlistfooter.html"/>]
    [<tag id="orderby" type="hidden" value="{bycategoryproduct}"/>]
    [<tag id="pagesize" type="hidden" value="30"/>]
    [<tag id="pagenumber" type="hidden" value="1"/>]
    [<tag id="selectedcatid" type="hidden" value=""/>]      
    [<tag id="searchtext" type="hidden" value=""/>]     
    [<tag id="searchcategory" type="hidden" value=""/>]
    [<tag id="selectedoptionid" type="hidden" value=""/>]            
    [<tag id="cascade" type="hidden" value="True"/>]            
    [<tag id="moveproductid" type="hidden" value=""/>]      
    [<tag id="movetoproductid" type="hidden" value=""/>]      
</div>

<div id="productlistsection">
    <div id="productlist"></div>        
</div>

[<tag type="if" function="settings" key="pageactions" testvalue="True" display="{ON}" />]
<div class="row pageactions"><!-- Page actions - also at top -->
	<div class="col-md-12">
		<div class="box">
			<div class="box-content">
				<div class="col-sm-6">
    				[<tag id="cmdAddNew2" type="linkbutton" cssclass="btn btn-primary" resourcekey="General.cmdAddButton" commandname="addnew" />]
				</div>
				<div class="col-sm-6 text-right">
					<!-- no language on this page -->
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</div>
[<tag type="endif" />]
